package com.quwancode.springboottemplate.controller;/**
 * @Description
 * @author ChengKai
 * @create 2023-12-09 15:49
 */

import com.quwancode.springboottemplate.common.utils.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: ChengKai
 * @time: 2023/12/9 15:49
 */
@RestController
@RequestMapping()
public class TestUrlController {
    @GetMapping()
    public Result<String> get(){
        return Result.ok("测试成功");
    }

    @GetMapping("/exception")
    public Result<String> exception(){
        throw new RuntimeException("测试异常");
    }
}
